package com.xnyzc.lhy.task.fallback.statistics;

import com.xnyzc.lhy.common.entity.Rv;
import com.xnyzc.lhy.common.penum.EErrorCode;
import com.xnyzc.lhy.task.fegin.statistics.QuartzCapacityStatisticsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 服务的降级， 如出现远程调用失败，则会触发该回调
 */
@Slf4j
@Service
@Transactional
public class QuartzCapacityStatisticsFallback implements QuartzCapacityStatisticsService {

    @Override
    public void getSaveCapacityStatistical() {
        log.error("保存运力数据超时");
    }

    @Override
    public Rv saveDriveOutCount() {
        log.error("出车司机保存失败");
        return Rv.wrap(EErrorCode.unkown);
    }

    @Override
    public Rv saveActiveDriver() {
        log.error("日活司机保存失败");
        return Rv.wrap(EErrorCode.unkown);
    }


}
